package com.itheima.controller;

import com.itheima.domain.Student;
import com.itheima.service.TestService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class TestServlet {
    public static void main(String[] args) {
        ApplicationContext abc = new ClassPathXmlApplicationContext("applicationContext.xml");
        TestService testService = (TestService) abc.getBean("TestService");
        List<Student> all = testService.findAll();
        for (Student student : all) {
            System.out.println(student);
        }

    }
}
